<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>餐桌列表</title>
<link rel="stylesheet" href="../css/input.css" />
<link rel="stylesheet" href="../css/diningShow/diningShow.css" />
<script src="../js/jquery-3.2.1.js" type="text/javascript"></script>
<script src="../js/diningShow/diningShow.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
</head>
<body>
	<div class="head">
		<h2>餐桌列表</h2>
		<hr>
	</div>
	<div class="caozuo">
			<input type="image" class="toggle" title="添加餐桌" src="../image/add2.png">
			<select class="onlySelect">
				<option>排序方式</option>
				<option value="showTableByStatus" status="0">空闲在前</option>
				<option value="showTableByStatus" status="1">已用在前</option>
			</select>
			<input type="image" class="deleteAll" title="查看所有" src="../image/suoyou.png">
		</div>
	<div class="total">
		<table class="table_table">
			<tr class="alter"> 
				<td>序号</td>
				<td >餐桌编号</td>
				<td>餐桌大小</td>
				<td>餐桌状态</td>
				<td>操作</td>
			</tr>
			<c:forEach items="${showTable.searchdining}" var="t" varStatus="a">
			<tr>
				<td id="index" class="index">${a.count}</td>
				<td id="name" class="name" >${t.tableName}</td>
				<td class="type" table_type="${t.type}">
					<c:choose>
						<c:when test="${t.type=='A'}">两人桌</c:when>
						<c:when test="${t.type=='B'}">四人桌</c:when>
						<c:when test="${t.type=='C'}">八人桌</c:when>
						<c:when test="${t.type=='D'}">十二人桌</c:when>
					</c:choose>
				</td>
				<td id="status" class="status" >${t.status==0?"空闲":"正在使用" }</td>
				<td>
					<input type="image" src="../image/arrange_table.png" class="changeStatus" tid="${t.tableName }" title="恢复空闲"/>
					<input type="image" src="../image/xiugai.png" class="changeTable" tid="${t.tableName }" title="修改餐桌"/>
					<input type="image" src="../image/shanchu.png" class="deleteTable" tid="${t.tableName }" title="删除此餐桌"/>
				</td>
			</tr>
			</c:forEach>
		</table>
	</div> 
	<!-- 弹出层  -->
	<div  class="tanchu">
		<div class="title">
			<div class="title_name">
				增加餐桌：
			</div>
			<div class="guanbi" onclick="guanbi()">
				<img alt="关闭" src="../image/guanbi.png" width="100%" height="100%">
			</div>
		</div>
		<iframe  frameborder="0" src="UpdatePassword.jsp" id="iframe2" name="iframe2"></iframe>
	</div>
	<!-- 弹出层后面的背景色 -->
	<div class="tanchu-bg"></div>
</body>
</html>